筛选过去一小时内的最高体温

FFIB 3 years ago
parent
commit
34b942cf28
1 changed files with 1 additions and 1 deletions
  1. 1 1
      api/eqpt_views.py

+ 1 - 1
api/eqpt_views.py

@@ -338,7 +338,7 @@ def mqtt_upload_temperature(payload):
338 338
             temperature__max = ThermometerMeasureLogInfo.objects.filter(
339 339
                 point_id=eqpt.point_id,
340 340
                 macid=macid,
341
-                created_at=tc.utc_datetime(hours=-1),
341
+                created_at__lte=tc.utc_datetime(hours=-1),
342 342
             ).aggregate(Max('temperature')).get('temperature__max') or 0
343 343
             ipui.observed_ymds = list(set(ipui.observed_ymds + [tc.local_string(format='%Y-%m-%d')]))
344 344
             ipui.observed_days = len(ipui.observed_ymds)